package com.game.messagebean.hall;

import com.baidu.bjf.remoting.protobuf.FieldType;
import com.baidu.bjf.remoting.protobuf.ProtobufIDLGenerator;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
import com.game.message.jpb.SuperJPB;
import com.game.message.messagecode.GameServerMsgStage;
import com.game.message.messagecode.HallMsg;
import com.game.message.messagecode.MsgStage;
import org.springframework.stereotype.Component;

/**
 * Created by legend9999 on 2016/4/25.
 */
@Component
public class LoginReq extends SuperJPB {
	@Protobuf(fieldType = FieldType.STRING, order = 101, required = true)
	private String loginName;
	@Protobuf(fieldType = FieldType.STRING, order = 102, required = true)
	private String password;
	//从哪个大游戏登录
	@Protobuf(fieldType = FieldType.INT32, order = 103, required = true)
	private int gameId = GameServerMsgStage.JINHUA;


	public int getMsgId() {
		return MsgStage.REQ + HallMsg.LOGIN;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getGameId() {
		return gameId;
	}

	public void setGameId(int gameId) {
		this.gameId = gameId;
	}

	public static void main(String[] args) {
		String idl = ProtobufIDLGenerator.getIDL(LoginReq.class);
		System.out.println(idl);
	}
}
